#include <iostream>
int main(){
    int n; std::cin >> n;
    int result[10000] = {0};
    result[0] = 1;
    int length = 1;
 
    for(int i = 2; i <= n; i++){
        int carriage = 0;
        for(int j = 0; j < length; ++j){
            int product = result[j] * i + carriage;
            result[j] = product%10;
            carriage = product/10;
        }
        while(carriage > 0){
            result[length] = carriage % 10;
            carriage = carriage / 10;
            length++;
        }
    }
    for(int i = length - 1; i >= 0; --i){
        std::cout << result[i];
    }
    return 0;
}